package com.itheima.day06;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Practice8 {
    public static void main(String[] args) {

        String data = " 来黑马程序员学习Java，\n" +
                "        电话：1866668888，18699997777\n" +
                "        或者联系邮箱：boniu@itcast.cn，\n" +
                "        座机电话：01036517895，010-98951256\n" +
                "        邮箱：bozai@itcast.cn，\n" +
                "        邮箱：dlei0009@163.com，\n" +
                "        热线电话：400-618-9090 ，400-618-4000，4006184000，4006189090";
        String rules= "1[3-9]\\d{9}";
        Pattern compile = Pattern.compile(rules);
        Matcher matcher = compile.matcher(data);
        while (matcher.find()) {
            String group = matcher.group();
            System.out.println(group);
        }
        boolean b = "314923u43892394".matches(rules);
        System.out.println("b = " + b);
    }
}
